package com.wjy.icu.controller;


import com.wjy.icu.common.annotation.PassToken;
import com.wjy.icu.common.core.domain.R;
import com.wjy.icu.domain.vo.EquitmentVo;
import com.wjy.icu.service.IMqttService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description: 初始化过程
 * @author: wangjunyong
 * @date: 2021/9/24 9:27
 */
@RestController
@RequestMapping("initialization")
public class MqttInitializationController {
    @Autowired
    private IMqttService mqttService;
    /**
     * @author liujianfu
     * @description    测试发布主题
     * @date 2021/8/16 15:04
     * @return RUtils
     */
    @PassToken
    @PostMapping(value = "/one")
    public R one(@RequestBody EquitmentVo equitmentVo) {
        mqttService.initialize(equitmentVo);
        return R.ok("OK");
    }
}
